package copy.code;

import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.util.ListBuffer;
import copy.application.Process;
import copy.express.pojo.Node;
import copy.express.pojo.NodeStack;
import copy.express.pojo.NodeType;
import copy.pojo.PropertyMeta;

public interface GenerateMethodBodyCode {
    /**
     * 生成调用类型转换器字节码: 设置属性
     * @param statments
     * @param methodDecl
     * @param propertyMeta
     */
    public JCTree.JCExpressionStatement genTypetransformCLassCode(ListBuffer<JCTree.JCStatement> statments, JCTree.JCMethodDecl methodDecl, PropertyMeta propertyMeta);

    /**
     * 只有一个字段情况,不需要运算
     * 生辰字节码: 调用Get和Set方法
     * @param statments
     * @param methodDecl
     * @param propertyMeta
     * @param node
     */
    public JCTree.JCExpressionStatement getExpressionStateByNode(NodeType node, JCTree.JCMethodDecl methodDecl);

    /**
     * 多个字段情况,需要运算
     * 生辰字节码: 调用Get和Set方法
     * @param statments
     * @param methodDecl
     * @param propertyMeta
     * @param node
     */
    public JCTree.JCExpressionStatement getExpressionStateByNodeStack( JCTree.JCMethodDecl methodDecl, PropertyMeta propertyMeta, NodeStack node);


}
